<div class="page-orderlist w clearfix ng-scope">

	<div class="user-tips">您能采购的商品以您所在地区的物流营销中心实际库存为准。</div>
    
	<div ng-include="'catalog/view/theme/bhz/pc/modules/includes/usernav.html'" ng-controller="UserNavCtrl" class="bhz-user-nav-wrap"></div>
    
	<div class="orderlist-page-wrap">
    	
		<div class="balance-back">
      		<h4>账户余额</h4>
			<p>{{customerBalance}} 元</p>
			<a class="recharge-btn" href="javascript:void(0);" ng-click="jump('/usercenter/recharge')">立即充值</a>
 		</div>
        
        <div class="order-list-title">
        	推荐产品：
        	<a class="recommend-btn" href="javascript:void(0);" ng-click="jump('/usercenter/deposit')">彩票加盟</a>
        </div>
        
        <div class="order-header clearfix" style="padding-left:18px;">
			<a href="javascript:void(0);" ng-click="switchTab('充值历史')" class="order-tab-title" ng-class="{'selected':selection.tab == '充值历史'}">充值历史</a>
            <a href="javascript:void(0);" ng-click="switchTab('定金历史')" class="order-tab-title" ng-class="{'selected':selection.tab == '定金历史'}">定金历史</a>
			<a href="javascript:void(0);" ng-click="switchTab('交易历史')" class="order-tab-title" ng-class="{'selected':selection.tab == '交易历史'}">交易历史</a>
		</div>
        
        <div class="orderlist-wrap" style="background:white;padding-top:20px;">
        	
            <table class="recharge-table" ng-if="selection.tab == '充值历史'">
            	<thead>
                    <tr>
                        <th class="left">单据号</th>
						<th class="left">操作人</th>
                        <th class="left">操作人类型</th>
                        <th class="left">充值账号</th>
                        <th width="15%" class="right">充值金额</th>
                        <th>充值方式</th>
                        <th>充值时间</th>
                        <th width="10%">状态</th>
						<th>操作/备注</th>
                    </tr>
         		</thead>
                <tbody>
                	<tr ng-repeat="recharge in rechargeOrder">
                    	<td>{{recharge.recharge_id}}</td>
						<td>{{recharge.runner}}</td>
                        <td>{{recharge.rtype}}</td>
                        <td>{{recharge.account}}</td>
                        <td class="right"><strong>{{recharge.money}}</strong> 元</td>
                        <td class="center">{{recharge.payment_method}}</td>
                        <td class="center">{{recharge.date_added}}</td>
                        <td class="center">{{recharge.status_name}}</td>
						<td class="center">
							<span ng-if="recharge.status < 3">
								<a style="margin:2px 2px;" class="recharge-btn" href="javascript:void(0);" ng-click="rechargeAgain(recharge.recharge_id,'alipay_direct')">支付宝</a>
								<a style="margin:2px 2px;" class="recharge-btn" href="javascript:void(0);"  ng-click="rechargeAgain(recharge.recharge_id,'kj_yijipay')">快捷支付</a>
								<a style="margin:2px 2px;" class="destory-btn" ng-click="destoryRecharge(recharge.recharge_id)" href="javascript:void(0);">作废</a>
							</span>
							<span ng-if="recharge.status > 2">
								{{recharge.memo}}
							</span>
						</td>
                    </tr>
                </tbody>
			</table>
            
            <table class="recharge-table" ng-if="selection.tab == '定金历史'">
            	<thead>
                    <tr>
                        <th class="left">单据号</th>
						<th class="left">操作人</th>
                        <th class="left">充值类型</th>
                        <th class="left">定金账号</th>
                        <th width="15%" class="right">定金金额</th>
                        <th>充值方式</th>
                        <th>充值时间</th>
                        <th width="10%">状态</th>
						<th>操作/备注</th>
                    </tr>
         		</thead>
                <tbody>
                	<tr ng-repeat="deposit in depositOrder">
                    	<td>{{deposit.recharge_id}}</td>
						<td>{{deposit.runner}}</td>
                        <td>{{deposit.btype}}</td>
                        <td>{{deposit.account}}</td>
                        <td class="right"><strong>{{deposit.money}}</strong> 元</td>
                        <td class="center">{{deposit.payment_method}}</td>
                        <td class="center">{{deposit.date_added}}</td>
                        <td class="center">{{deposit.status_name}}</td>
						<td class="center">
							<span ng-if="deposit.status < 3">
								<a style="margin:2px 2px;" class="recharge-btn" href="javascript:void(0);" ng-click="rechargeAgain(deposit.recharge_id,'alipay_direct')">支付宝</a>
								<a style="margin:2px 2px;" class="recharge-btn" href="javascript:void(0);"  ng-click="rechargeAgain(deposit.recharge_id,'kj_yijipay')">快捷支付</a>
								<a style="margin:2px 2px;" class="destory-btn" ng-click="destoryRecharge(deposit.recharge_id)" href="javascript:void(0);">作废</a>
							</span>
							<span ng-if="deposit.status > 2">
								{{deposit.memo}}
							</span>
						</td>
                    </tr>
                </tbody>
			</table>
            
            <table class="recharge-table" ng-if="selection.tab == '交易历史'">
            	<thead>
                    <tr>
                        <th class="left">单据号</th>
                        <th width="20%" class="left">交易类型</th>
                        <th class="right">交易金额</th>
                        <th width="20%">交易时间</th>
                        <th>状态</th>
                    </tr>
         		</thead>
                <tbody>
                	<tr ng-repeat="trade in tradeOrder">
                    	<td>{{trade.order_id}}</td>
                        <td>订单</td>
                        <td class="right"><strong>{{trade.total}}</strong> 元</td>
                        <td class="center">{{trade.date_added}}</td>
                        <td class="center">{{trade.status_name}}</td>
                    </tr>
                </tbody>
            </table>
        	
        </div>
        
	</div>
    
</div>
